package com.download.web.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.download.web.entity.BusFriendLink;
import com.download.web.entity.model.Page;
import com.download.web.mapper.BusFriendLinkMapper;
import com.download.web.service.IBusFriendLinkService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class BusFriendLinkService extends ServiceImpl<BusFriendLinkMapper, BusFriendLink> implements IBusFriendLinkService {

    @Resource
    private BusFriendLinkMapper friendLinkMapper;
    @Override
    public Page<BusFriendLink> friendLinkPage(Integer pageIndex, Integer pageSize) {
        List<BusFriendLink> friendLinks=friendLinkMapper.friendLinkList(pageIndex*pageSize,pageSize);
        return new Page(friendLinks,friendLinkMapper.friendLinkCount(),pageIndex,pageSize);
    }
}
